Sharpness adjustment method and program and electronic endoscope apparatus

ABSTRACT

The sharpness of an image obtained by an endoscope is adjusted. A sharpness enhancement amount is determined for each pixel based on the value of each pixel which forms a luminance distribution image. Further, a portion contributing to adjustment of brightness and a portion contributing to adjustment of saturation in the sharpness enhancement amount are determined for each pixel of the image so that the sum thereof is equal to the sharpness enhancement amount. Then, an adjustment value of saturation, which is obtained by weighting the value of each pixel of the image based on the portion contributing to saturation, and an adjustment value of brightness, which is obtained by weighting the value of each pixel of the luminance distribution image, which corresponds to each pixel of the image, based on the portion contributing to brightness, are added to the value of each pixel of the image.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing function of anelectronic endoscope apparatus. Particularly, the present inventionrelates to a sharpness adjustment function for adjusting the sharpnessof an image.

2. Description of the Related Art

A sharpness enhancement method for enhancing the sharpness of an imageby emphasizing or suppressing each frequency component included in animage signal by a degree which is different from each other for eachfrequency is well known (please refer to U.S. Pat. No. 5,739,922, forexample).

An image (hereinafter, referred to as an endoscopic image) obtained byan electronic endoscope is an image of a body cavity. Therefore, theentire area of the image has a similar color. There is a possibilitythat all kinds of color existing in nature are included in a photographof a person, landscape, or the like. However, only the color of themucous membrane or a test agent may be included in the endoscopic image.Further, since no clear boundary is present in the body cavity, theendoscopic image does not include an object which may be classified asan edge. Further, when sharpness enhancement processing is performed ona photograph of a person or the like, the processing is performed toimprove the image quality of the whole image of the photograph. However,when sharpness enhancement processing is performed on the endoscopicimage, the processing is performed to emphasize information which isnecessary for diagnosis in many cases.

The method disclosed in U.S. Pat. No. 5,739,922 may be applied to imageprocessing of the electronic endoscope apparatus. However, since theimage processing of the electronic endoscope apparatus is different fromother image processing, as described above, more sophisticated sharpnessadjustment method which is appropriate for image processing of theelectronic endoscope apparatus is desired.

SUMMARY OF THE INVENTION

The first method of the present invention is a method for adjusting thesharpness of an image obtained by an endoscope. The method ischaracterized by performing the following processing. Further, theprogram of the present invention is characterized by causing a computerto execute the following processing.

The first processing is a processing for determining a sharpnessenhancement amount for each pixel of an image based on the value of eachpixel which forms a luminance distribution image representing thedistribution of luminance of the image. The brightness level of eachregion of an original image is judged based on the luminancedistribution image, and the sharpness enhancement amount is determinedbased on the brightness level. The method for determining the sharpnessenhancement amount differs according to the design policy of theapparatus. For example, the sharpness enhancement amount should bedetermined so that the enhancement amount in a dark region is higherthan the enhancement amount in a light region.

The second processing is a processing for determining a portioncontributing to brightness, which represents a portion of the sharpnessenhancement amount, which contributes to adjustment of brightness, and aportion contributing to saturation, which represents a portion of thesharpness enhancement amount, which contributes to adjustment ofsaturation, for each pixel of the image so that the sum of the portioncontributing to brightness and the portion contributing to saturation isequal to the sharpness enhancement amount. In this case, it ispreferable that an allocation to the portion contributing to brightnessand an allocation to the portion contributing to saturation aredetermined for each pixel of the image based on the value of each pixelof the luminance distribution image, which corresponds to each pixel ofthe image. The method for determining the allocations differs accordingto the design policy of the apparatus. For example, the allocationsshould be determined so that the allocation to the portion contributingto saturation is increased in a dark region in which it is difficult toreproduce the color of the image.

The third processing is a processing for adding an adjustment value ofsaturation, which is obtained by weighting the value of each pixel ofthe image based on the portion contributing to saturation, and anadjustment value of brightness, which is obtained by weighting the valueof each pixel of the luminance distribution image, which corresponds toeach pixel of the image, based on the portion contributing tobrightness, to the value of each pixel which forms the image. Since theadjustment value of saturation as well as the adjustment value ofbrightness is added to an original value, it is possible to adjust thesharpness of the image while considering the color of the image.

The second method and program of the present invention is characterizedin that processing for adding a value which is obtained by multiplyingthe sharpness enhancement amount by a ratio between the value of eachpixel of the image and the value of each pixel of the luminancedistribution image, which corresponds to each pixel of the image, to thevalue of each pixel which forms the image is performed after the samefirst processing as that of the first method is performed. Since boththe brightness and the saturation are also added in this case, it ispossible to adjust the sharpness of the image while considering thecolor of the image.

The first electronic endoscope apparatus of the present invention is anelectronic endoscope comprising:

a luminance distribution image production means for producing aluminance distribution image which represents the distribution ofluminance of an image obtained by an endoscope; and

a sharpness adjustment means for adjusting the sharpness of the image byusing the luminance distribution image produced by the luminancedistribution image production means, wherein the sharpness adjustmentmeans performs each processing in the first method of the presentinvention.

The second electronic endoscope apparatus of the present invention is anelectronic endoscope apparatus comprising:

a luminance distribution image production means for producing aluminance distribution image which represents the distribution ofluminance of an image obtained by an endoscope; and

a sharpness adjustment means for adjusting the sharpness of the image byusing the luminance distribution image produced by the luminancedistribution image production means, wherein the sharpness adjustmentmeans performs each processing in the second method of the presentinvention.

According to the present invention, since the sharpness enhancementamount is determined based on the brightness and the saturation of theoriginal image, an image which has natural color can be reproduced whilethe sharpness of the image is enhanced.

Note that the program of the present invention may be provided beingrecorded on a computer readable medium. Those who are skilled in the artwould know that computer readable media are not limited to any specifictype of device, and include, but are not limited to: floppy disks, CD'sRAM'S, ROM's, hard disks, magnetic tapes, and internet downloads, inwhich computer instructions can be stored and/or transmitted.Transmission of the computer instructions through a network or throughwireless transmission means is also within the scope of this invention.Additionally, computer instructions include, but are not limited to:source, object and executable code, and can be in any language includinghigher level languages, assembly language, and machine language.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating the configuration of anelectronic endoscope system;

FIG. 2 is a diagram illustrating the configuration of a board (circuitboard or substrate) specialized in image processing in detail;

FIG. 3 is a flow chart illustrating the outline of initializationprocessing performed by a microcomputer 32;

FIG. 4 is a flow chart illustrating the outline of processing performedby a microcomputer 42;

FIG. 5 is a diagram for explaining processing for converting data to10-bit data;

FIG. 6 is a diagram illustrating an example of a three-dimensionallookup table which is used by a standard image production unit;

FIG. 7 is a diagram illustrating another example of a three-dimensionallookup table which is used by the standard image production unit;

FIG. 8 is a diagram for explaining a method for processing values whichare not in a lookup table;

FIG. 9 is a flow chart illustrating the outline of processing performedby a brightness/saturation adjustment unit;

FIG. 10 is a diagram illustrating an example of a lookup table LUTywhich is used by the brightness/saturation adjustment unit;

FIG. 11 is a diagram illustrating an example of a lookup table LUTrwhich is used by the brightness/saturation adjustment unit;

FIG. 12A is a diagram for explaining a relationship between the size ofa filter for image processing and the result of processing;

FIG. 12B is a diagram for explaining a relationship between the size offilter for image processing and the result of processing;

FIG. 13 is a flow chart illustrating the outline of processing performedby a sharpness adjustment unit;

FIG. 14A is a diagram illustrating an example of a Gaussian filter whichis used by the sharpness adjustment unit;

FIG. 14B is a diagram illustrating another example of a Gaussian filterwhich is used by the sharpness adjustment unit;

FIG. 14C is a diagram illustrating another example of a Gaussian filterwhich is used by the sharpness adjustment unit;

FIG. 15 is a flow chart illustrating the outline of processing performedby a hue adjustment unit;

FIG. 16 is a diagram illustrating an example of a lookup table LUThwhich is used by the hue adjustment unit; and

FIG. 17 is a diagram illustrating another example of the lookup tableLUTh which is used by the hue adjustment unit.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

As an embodiment of the present invention, an electronic endoscopesystem which is used for examination of digestive organs will bedescribed below.

1. System Configuration

FIG. 1 is a schematic diagram illustrating the configuration of anelectronic endoscope system. As illustrated in FIG. 1, the electronicendoscope system 1 includes an electronic endoscope 2 (hereinafter,referred to as a scope 2) and a processing apparatus (hereinafter,referred to as a video processor 3) which processes an image obtained bythe electronic endoscope. The electronic endoscope system 1 alsoincludes a light source device, monitor, printer, or the like, which arenot illustrated. A plurality of kinds of scopes which are appropriatefor the purpose of endoscopic examination may be used in the electronicendoscope system 1. In FIG. 1, elements which are common to all of thescopes are illustrated in the scope 2.

The scope 2 includes a CCD (Charge Coupled Device) 21 and a signalprocessing circuit 22 for processing signals obtained by the CCD 21. Thescope 2 also includes a microcomputer 23 which performs various kinds ofcontrol processing and a connector unit (not illustrated) which isconnected to the video processor 3.

The CCD 21, together with an objective lens, is attached to the leadingedge of the scope 2. The CCD 21 obtains light reflected at anobservation object, and converts the light into an electric signal. Inthe present embodiment, the imaging resolution of the CCD isapproximately 5 μm.

The signal processing circuit 22 performs signal processing, such ascorrelated double sampling, automatic gain control, and A/D conversion,on a signal output from the CCD 21. The microcomputer 23 controls theoperation of the signal processing circuit 22 and data transfer to theprocessor 3.

Here, an obtainment method of color information by the scope 2 will bedescribed. Generally, the CCD has a color filter. The CCD obtainsinformation about the color of the observation object by obtaining thelight reflected at the observation object through the color filter.Therefore, if the arrangement methods of color filters in CCD's or thekinds of the color filters are different from each other, the quality ofobtained color information about images and the color representation ofthe images are different from each other.

For example, if the CCD's are classified based on the arrangement methodof the color filter, CCD's of a plane sequential type and CCD's of asimultaneous type are well known. The CCD's of the plane sequential typeobtain information about each color in turn while rotating a rotaryfilter. The CCD's of the simultaneous type obtain information about allof the colors at once through a mosaic filter. The CCD's of the planesequential type are used in some conventional scopes, and the CCD's ofthe simultaneous type are used in some other conventional scopes.However, when the motion of a region which is photographed is fasterthan the rotation speed of the filter, if the region is photographed bythe CCD of the plane sequential type, an image of each color is shiftedfrom that of another color in some cases. Therefore, in the electronicendoscope system 1, a scope including a CCD of the simultaneous type isused as the scope 2.

Further, as the kinds of the color filters, a primary color filter and acomplementary color filter are well known. The primary color filterseparates light into three color components of red (R), green (G) andblue (B). The complementary color filter separates light into four colorcomponents of cyan (C), magenta (M), yellow (Y) and green (G). When animage is obtained by a CCD (hereinafter, referred to as a primary colorCCD), in which the primary color filter is provided, the image isrepresented by RGB. When an image is obtained by a CCD (hereinafter,referred to as a complementary color CCD), in which the complementarycolor filter is provided, the image is represented by CMYG. Therefore,the conventional electronic endoscope system can use only one of a scopein which the primary color filter is provided and a scope in which thecomplementary color filter is provided. However, in the electronicendoscope system 1, a plurality of kinds of scopes in which differentkinds of color filters are provided may be used.

Table 1 shows examples of scopes which can be used in the electronicendoscope system 1. TABLE 1 Resolution CCD Cut Filter Scope A 650,000pixels RGB None Scope B 650,000 pixels RGB Cut a specific color amongreds Scope C 650,000 pixels RGB Cut a specific color among yellows ScopeD 850,000 pixels RGB None Scope E 410,000 pixels CMYG None Scope F410,000 pixels CMYG Cut a specific color among reds Scope G 180,000pixels RGB Cut a specific color among yellows Scope H 270,000 pixelsCMYG None

In Table 1, a primary color filter is provided in each of the CCD's ofthe scopes A, B and C, and the resolutions of the scopes A, B and C arethe same. However, a cut filter is provided in each of the scopes B andC in addition to the filter provided in the CCD. The cut filter preventspassage of light which has a specific color. As described above, themethods for obtaining the color information about the observation objectdiffer from each other as to whether the CCD is a CCD of a planesequential type or a CCD of a simultaneous type. The methods also differfrom each other as to whether the CCD is a primary color CCD or acomplementary color CCD. Further, the methods differ from each other asto the kind of the cut filter which is combined with each CCD.

Next, the configuration of the processor 3 will be described. Theprocessor 3 includes a connector unit, which is not illustrated. Theconnector unit of the processor 3 is structured so that it can be easilyconnected to or disconnected from the connector unit in each of thescopes.

Further, the processor 3 includes a signal processing circuit 31. Thesignal processing circuit 31 produces video signals by performing gammacorrection on signals input from the signal processing circuit 22 of thescope 2 through the connector units. If signals output from the signalprocessing circuit 22 of the scope are CMYG signals, the signalprocessing circuit 31 also performs processing for converting CMYGsignals into RGB signals. Further, the processor 3 includes amicrocomputer 32 which controls an operation of the signal processingcircuit 31 and communication with the scope 2. Further, a signalprocessing circuit 35 is arranged after the signal processing circuit31. The signal processing circuit 35 produces a signal for outputting animage at the monitor by performing pixel number conversion and D/Aconversion.

Further, the processor 3 includes a board (circuit board or substrate) 4specialized in image processing besides a main board (main substrate) onwhich the signal processing circuit 31, the microcomputer 32 and thesignal processing circuit 35 are mounted. An image processing circuit 41is mounted on the board 4 specialized in image processing. The imageprocessing circuit 41 performs various kinds of image processing onimage signals output from the signal processing circuit 31. Amicrocomputer 42 for controlling the image processing circuit 41 is alsomounted on the board 4 specialized in image processing. The imageprocessing circuit 41 is connected to the signal processing circuits 31and 35 through selectors 33 and 34. The selectors 33 and 34 are switchedbased on control signals from the microcomputer 32.

FIG. 2 is a diagram illustrating the configuration of the board 4specialized in image processing in detail. As illustrated in FIG. 2, theimage processing circuit 41 includes six processing units, namely astandard image production unit 411, a color replacement unit 412, abrightness/saturation adjustment unit 413, a sharpness adjustment unit414, a hue adjustment unit 415, and a post-processing unit 416. It ispossible to selectively cause the color replacement unit 412, thebrightness/saturation adjustment unit 413, the sharpness adjustment unit414 and the hue adjustment unit 415 to operate by switching selectors417 a through 417 e. The selectors 417 a through 417 e are switchedbased on control signals sent from the microcomputer 42.

Further, a memory 43 is mounted on the board 4 specialized in imageprocessing. The memory 43 stores various kinds of lookup tables whichare used in processing performed by the color replacement unit 412, thebrightness/saturation adjustment unit 413, the sharpness adjustment unit414, and the hue adjustment unit 415. Among the lookup tables, a lookuptable which is used by the color replacement unit 412 is stored for eachmachine type of the scope. The memory 43 also stores various kinds ofparameters for processing. The lookup tables and parameters forprocessing stored in the memory 43 include those stored in the memory 43when the electronic endoscope system 1 was shipped from the manufacturethereof and those stored by the user after the electronic endoscopesystem 1 was purchased by the user. These lookup tables and parametersare referred to by the microcomputer 42, as will be described later.

Here, switching of the selectors 33 and 34 and selectors 417 a through417 e will be further described. The user sets, at an operation panel,whether the function of the board 4 specialized in image processing isutilized. When the function of the board 4 specialized in imageprocessing is utilized, the user also sets, at the operation panel,whether each function of the color replacement unit 412, thebrightness/saturation adjustment unit 413, the sharpness adjustment unit414 and the hue adjustment unit 415 is utilized. Information(hereinafter, referred to as setting information) about settingperformed by the user at the operation panel is stored in a memory. Itis preferable that this memory is provided as a separate memory forstoring the setting information. However, a part of the area of thememory 43 or a memory which is provided for other purposes may be used.

This memory can store a plurality of sets of setting information aboutfunction selection together. Therefore, the user may select a functionat the operation panel whenever he/she uses the electronic endoscopesystem. Alternatively, setting information for each purpose ofexamination may be stored in advance, and the user may use the storedinformation by retrieving it.

The setting information may be stored for each observation region inadvance. For example, setting which is appropriate for observation ofthe stomach or setting which is appropriate for observation of the largeintestine may be stored in advance. Alternatively, setting informationmay be stored for each test agent which is used in the examination. Forexample, setting which is appropriate for examination using dark bluetest agent or setting which is appropriate for examination using reddishbrown test agent may be stored in advance. Further, setting informationmay be stored for each examination target which should be detected inthe examination. For example, setting which is appropriate for detectionof an aneurysm or setting which is appropriate for detection of a tumor,may be stored in advance.

FIG. 3 is a flow chart illustrating the outline of initializationprocessing performed by the microcomputer 32 when the power source isturned on. When the scope 2 is connected to the processor 3 and thepower source of the electronic endoscope apparatus 1 is turned on, themicrocomputer 32 communicates with the microcomputer 23 of the scope 2,and obtains data (hereinafter, referred to as scope data) fordistinguishing the machine type of the scope 2 (step S101). The scopedata includes information illustrated in table 1, namely informationrepresenting the resolution of the CCD and the kind of the filter. Theinformation representing the kind of the filter includes information asto whether the filter is a primary color filter or a complementary colorfilter, whether a cut filter is provided, the frequency (color) which iscut by the cut filter, or the like.

Next, the microcomputer 32 refers to the setting information stored inthe memory (step S102). If a plurality of sets of setting information isstored in the memory, the microcomputer 32 refers to setting informationwhich is selected by an operation at the operation panel by the user.When the user performs an operation for selecting the settinginformation at the operation panel, a selection signal which representsthe content of selection is input to the microcomputer 32. Themicrocomputer 32 judges the selected setting information based on theselection signal input to the microcomputer 32. Then, the microcomputer32 judges, based on the setting information which the microcomputer 32has referred to, whether it is necessary to connect the signalprocessing circuits 31 and 35 to the board 4 specialized in imageprocessing (step S103). The microcomputer 32 controls the selectors 33and 34 based on the judgment result (steps S104 and S109). If it is notnecessary to connect the signal processing circuits 31 and 35 to theboard 4 specialized in image processing, and if the board 4 specializedin image processing is disconnected from the signal processing circuits31 and 35, initialization processing ends.

If the microcomputer 32 controls the selectors so that the board 4specialized in image processing is connected to the image processingcircuits 31 and 35 in step S104, the microcomputer 32 judges, based onthe setting information which the microcomputer 32 referred to in stepS102, whether the combination of functions selected by the user isappropriate (step S105).

If the microcomputer 32 judges that the combination of the selectedfunctions is appropriate, the microcomputer 32 sends instruction datarepresenting the content of selection to the microcomputer 42 in theboard 4 specialized in image processing. The microcomputer 32 sends theinstruction data together with the scope data obtained in step S101(step S108).

Meanwhile, if the microcomputer 32 judges that the combination of theselected functions is inappropriate, the microcomputer 32 outputs analert message at a monitor (not illustrated) which is connected to theprocessor 3 (step S106). In this case, the microcomputer 32automatically corrects the combination of the functions to anappropriate combination (step S107). Then, the microcomputer 32 sendsinstruction data representing the content of correction to themicrocomputer 42 of the board 4 specialized in image processing. Themicrocomputer 32 sends the instruction data together with the scope dataobtained in step S101 (step S108).

After the alert message is output, it is also possible that the scopedata and the instruction data is sent only after the user performs aconfirmation operation.

The judgment as to whether the function selection is appropriate is madebased on a judgment rule which is stored in advance. Data which definesthe judgment rule is stored in advance in the memory provided in theprocessor 3. The judgment rule is, for example, a rule that the colorreplacement unit must always operate whenever the brightness/saturationadjustment unit operates. The microcomputer 32 judges whether theselection of functions by the user is appropriate by checking thesetting information with the data which defines the judgment rule.

Next, operations of the microcomputer 42 will be described withreference to FIG. 4. When the microcomputer 42 receives the scope dataand the instruction data sent from the microcomputer 32 (step S201), themicrocomputer 42 distinguishes the machine type of the scope based onthe scope data. Further, the microcomputer 42 distinguishes the selectedfunction based on the instruction data (step S202). Then, themicrocomputer 42 controls the selectors 417 a through 417 e so thatsignals are input to a processing unit which provides the selectedfunction (step S203). Then, the microcomputer 42 retrieves a lookuptable or a parameter which is required by each processing unit from thememory 43 (step S204).

As described above, some of the lookup tables are stored for eachmachine type of the scope. The distinction result of the machine type ofthe scope is used to select a lookup table which is retrieved from thememory. The retrieved lookup table or parameter is sent to a processingunit in which the lookup table or parameter is required (step S205).

As described above, the processor 3 of the electronic endoscope system 1performs image processing after the machine type of the scope 2 isdistinguished. In other words, the processor 3 performs image processingafter the color information obtainment method of the scope isdistinguished. Therefore, any kind of scope may be used as the scope 2.In other words, the type of the scope 2 is not limited to a scope inwhich a complementary color CCD is provided or a scope in which aprimary color CCD is provided.

Further, the user can flexibly select an image processing function whichshe/he wishes to use by performing a predetermined setting operation atthe operation panel or by retrieving setting which has been stored inadvance. In this case, even if the user selects an inappropriatefunction because of lack of knowledge or the like, the alert message isoutput, and an appropriate function is automatically selected.Therefore, the image processing function can be always used effectively.

Further, if a user does not use the function of the board 4 specializedin image processing, he/she can stop input of signals to the board 4specialized in image processing by performing a predetermined settingoperation at the operation panel. Accordingly, it is possible to preventelectric power from being consumed because of unutilized functions.

The image processing circuit 41 may be a circuit on which a plurality ofsemiconductor apparatuses is arranged. The plurality of semiconductorapparatuses provide functions of the standard image production unit 411,the color replacement unit 412, the brightness/saturation adjustmentunit 413, the sharpness adjustment unit 414, the hue adjustment unit 415and the post-processing unit 416, respectively. Alternatively, the imageprocessing circuit 41 may be a circuit on which a CPU (centralprocessing unit) specialized in image processing and a memory whichstores six kinds of image processing programs are arranged. In the imageprocessing circuit 41, whether each processing is performed may beswitched in each of the programs.

2. Image Processing Function of System

Image processing performed in the image processing circuit 41 will bedescribed below in detail. Image processing functions provided by theimage processing circuit 41 may be largely classified into two kinds offunctions.

The first function is a function of absorbing the difference in thecolor information obtainment method of the scope. Specifically, thedifference in the color information obtainment method is absorbed byproducing a standard image which does not depend on the machine type ofthe scope. In other words, the difference in the color informationobtainment method is absorbed by producing a standard image which doesnot depend on the kind of the color filter of the CCD. The standardimage is produced by the standard image production unit 411 so that thecolor of a photographed region is faithfully reproduced.

The second function is a function of processing the standard imageproduced by the first function so that the standard image becomesappropriate for diagnosis. The second function is provided by the colorreplacement unit 412, the brightness/saturation adjustment unit 413, thesharpness adjustment unit 414, and the hue adjustment unit 415.

The color replacement unit 412 performs image processing so that thecolor of the image satisfies the taste of the user. Thebrightness/saturation adjustment unit 413 performs image processing sothat a dark unclear area of the image becomes clearly recognized. Thesharpness adjustment unit 414 performs image processing so thatstructures (for example, projections/depressions or blood vessels) whichare necessary for diagnosis are enhanced. Further, the hue adjustmentunit 415 performs image processing so that the difference in colorswhich are necessary for diagnosis is enhanced. The hue adjustment unit415 also performs image processing so that the difference in colorswhich are not necessary for diagnosis or so that the difference incolors which prevents correct diagnosis is reduced. The post-processingunit 416 performs processing for removing noises and processing forproducing a signal for outputting information at the monitor.

An example of processing performed by each unit will be specificallydescribed.

2.1 Standard Image Production Unit

The standard image production unit 411 is a processing unit whichproduces a standard image. The standard image production unit 411performs predetermined preprocessing before producing the standardimage. First, the preprocessing will be described.

As described above in the explanation of the signal processing circuit31, in the electronic endoscope system 1, if the scope 2 includes acomplementary color CCD, CMYG signals are converted into RGB signals atthe signal processing circuit 31. Specifically, the signal processingcircuit 31 converts signals obtained by the complementary color CCD intoluminance signals Y and chrominance signals (color difference signals)Cr and Cb. The luminance signals Y and the chrominance signals Cr and Cb(hereinafter, referred to as YCC signals) are further converted intoprimary color signals R, G and B.

Therefore, there is a possibility that each value of an RGB signal inputto the image processing circuit 41 includes a value of a decimalfraction. If a value including a decimal fraction is used in complexcalculation, an error due to rounding off may be caused in the result ofcalculation while calculation for image processing is repeated. Hence,there is a possibility that the error is represented as a difference incolor.

Therefore, first, the standard image production unit 411 performsprocessing for converting 8-bit data into 10-bit data. Specifically, anarea corresponding to 10 bits is prepared for each value of R, G and Bfor each pixel of the image, and a value obtained by multiplying the8-bit data by 4 is stored in the area for 10 bits. As illustrated inFIG. 5, this operation is performed by shifting the value of 8-bit databy 2 bits to the higher place and storing the shifted value in the areafor 10 bits. Then, “0” is stored in the lowest two places of the area.Accordingly, it is possible to increase the effective places forcalculation. Therefore, the error caused by rounding off can be reduced.The data converted into 10-bit data by the standard image productionunit 411 is reconverted into 8-bit data at the post-processing unit 416,and output at the monitor.

Next, processing for producing a standard image based on the 10-bit datawill be described.

A standard image is produced by converting (replacing) RGB data whichhas been converted into 10-bit data. The RGB data of 10 bits isconverted by using a three-dimensional lookup table 5 (hereinafter,referred to as three-dimensional LUT 5) which has been produced inadvance.

As illustrated in FIG. 6, the three-dimensional LUT 5 is a table forreplacing the values (R, G and B) of colors obtained by the scope withthe values (R′, G′ and B′) of actual colors. The values of colors whichmay be obtained by the scope can be obtained by actually observing eachregion of a human body with the scope. Further, the values of actualcolors can be obtained by measuring the color of each region of a humanbody with a measuring system during surgery. Therefore, athree-dimensional LUT 5 for the scope can be produced by correlatingboth data for the same region.

If data is collected by performing observation for each machine type ofthe scope, a three-dimensional LUT 5 for each machine type can beproduced. If the three-dimensional LUT 5 which is produced as describedabove is used, it is possible to absorb not only the difference in thecolor information obtainment method of the scope but also difference inother elements besides the color. For example, a difference in theaberration of an objective lens may be absorbed.

The three-dimensional LUT 5 for each machine type, which is produced asdescribed above, is stored in the memory 43 illustrated in FIG. 2. Thethree-dimensional LUT 5 is provided for the standard image productionunit 411 by the microcomputer 42 as described above with reference toFIG. 4. The standard image production unit 411 produces a standard imagein which the true colors of the observation object are faithfullyreproduced by replacing the R, G and B values of each pixel of the imageby using the three-dimensional LUT 5.

The three-dimensional LUT 5 is used to replace data which representseach of R, G and B values in 10 bits with data which represents each ofR, G and B values in 10 bits. In the three-dimensional LUT 5, 1024³correspondences are stored. Further, since the three-dimensional LUT 5must be stored for each machine type of the scope, a plurality of LUT's5 must be prepared. Hence, it is necessary that the capacity of thememory 43 is sufficiently large to store the three-dimensional LUT's 5.

If the capacity of the memory is limited, only a part of thecorrespondences may be stored in each of the LUT's, and correspondencesother than the stored correspondences may be obtained by performinginterpolation calculation. For example, as illustrated in FIG. 7, onlycorrespondences when each of the values of R, G, and B is one of 0, 32,63, 96, . . . , 255 (every 32nd value) are stored in a three-dimensionalLUT 6.

If RGB values which are not stored in the three-dimensional LUT 6 areinput, coordinate points A through H are extracted from the vicinity ofa coordinate point P (r, g, b) of the input value in the RGB space, asillustrated in FIG. 8. Correspondences regarding the coordinate points Athrough H are stored in the three-dimensional LUT 6. Then, the RGBvalues of the coordinate points A through H are replaced with R′G′B′values of coordinate points A′ through H′ based on the three-dimensionalLUT 6.

Then, the R′G′B′ values of the coordinate points A′ through H′ areweighted based on the relationship between each of the coordinate pointsA through H and the coordinate point P, and added. Accordingly, althougha correspondence regarding the coordinate point P (r, g, b) is notstored in the three-dimensional LUT 6, a coordinate point P′ (r′, g′,b′) which corresponds to the coordinate point P (r, g, b) can beobtained.

A standard image which does not depend on the machine type of the scope,and in which the true colors of the actual object is faithfullyreproduced, can be obtained by performing the processing as describedabove. Image processing after production of the standard image isperformed by using the standard image as a processing object. Therefore,the quality of images output from the image processing circuit 41 is notinfluenced by the machine type of the scope. In other words, even if themachine type of the scope is different from each other, the quality ofthe images output from the image processing circuit 41 is the same.

In the present embodiment, processing performed by the color replacementunit and other processing units after the color replacement unit may besuppressed by switching the selectors 417 a through 417 e. Accordingly,the standard image produced by the standard image production unit 411can be output at the monitor.

2.2. Color Replacement Unit

The color replacement unit 412 performs color replacement processing sothat the color of the image satisfies the taste of the user.

For example, a xenon lamp is often used as a light source of theelectronic endoscope system. However, when an electronic endoscope wasintroduced, a halogen lamp was used as the light source. Images obtainedby the electronic endoscope using the halogen lamp had yellowish colors.Therefore, a considerable number of users think that they can diagnosepatients more accurately using images which have accustomed colors thanimages in which the colors of the actual object are faithfullyreproduced. Therefore, the color replacement unit 412 replaces thecolors of the standard image with colors desired by the user so as tosatisfy the need of the user as described above.

A three-dimensional LUT is also used to replace the colors in a similarmanner to the processing for producing the standard image. Thethree-dimensional LUT which is used to replace the colors is a table forreplacing RGB values of the standard image with R′G′B′ values of colorsdesired by the user. This table may be provided by a manufacturer of theelectronic endoscope system 1. Alternatively, the table may be producedby the user.

The three-dimensional LUT which is used by the color replacement unit412 is also stored in the memory 43 illustrated in FIG. 2. Thethree-dimensional LUT is sent from the microcomputer 42 to the colorreplacement unit 412 through the process as described above withreference to FIG. 4. The setting information includes information whichis necessary for selection of the table. If a plurality ofthree-dimensional LUT's is stored in the memory 43, a table is selectedbased on the setting information, and the selected table is sent to thecolor replacement unit 412. The color replacement unit 412 converts theRGB values of each pixel which forms the standard image by using thethree-dimensional LUT which is sent from the microcomputer 42.

Here, only a part of correspondences may be stored in thethree-dimensional LUT in a similar manner to processing for producingstandard images. If correspondences regarding some RGB values are not inthe three-dimensional LUT, the RGB values may be converted by performinginterpolation calculation.

2.3. Brightness/Saturation Adjustment Unit

The brightness/saturation adjustment unit 413 performs processing foradjusting the brightness level of the image. Specifically, thebrightness/saturation adjustment unit 413 performs image processing soas to solve a problem caused by a substantial difference inlightness/darkness within the image.

For example, when an image of a region at the opening to the duodenum isobtained by an endoscope, a difference in lightness/darkness is largebetween the front portion (on the stomach side) and the back portion (inthe duodenum). Especially, when an image is obtained by the endoscopeafter dark test agent such dark blue test agent is distributed, there isa problem that the image of the inside of the duodenum is too dark, andit is impossible to observe the duodenum. It is necessary for diagnosisto obtain an image in which all the area of the image, including thefront portion through the back portion, can be clearly recognized evenif the test agent is distributed. However, unlike ordinary photography,it is impossible to adjust the position or direction of lighting duringendoscopy. Further, it is impossible to increase the intensity of thelight of the lighting because if the intensity is too high, the humanbody may be burned. Therefore, it is necessary to adjust the brightnesslevel of the image by image processing so as to obtain an image whichhas an appropriate brightness level.

The CCD is an element which controls output electric power based on theamount of light. Since when a dark region is photographed, the outputelectric power is small, the color information of the region may not beobtained accurately. In this case, if the value of the luminancecomponent of the image is simply increased by image processing, there isa problem that dark blue is not changed to light blue but to green.Therefore, when the brightness/saturation adjustment unit 413 performsprocessing, the brightness/saturation adjustment unit 413 does notsimply adjust the brightness of the image. The brightness/saturationadjustment unit 413 adjusts the brightness level while adjusting thecolor of the image.

FIG. 9 is a flowchart illustrating the outline of processing performedby the brightness/saturation adjustment unit 413. First, thebrightness/saturation adjustment unit 413 converts an input image intoYCC signals, and produces a luminance image Y which includes onlyluminance components (step S301). In the following description, theposition of each pixel which forms the image is represented by (x, y),and the value of a pixel at position (x, y) of an image I is representedby I(x, y).

Then, the brightness/saturation adjustment unit 413 performs blurprocessing on the luminance image Y using a filter for image processing,and produces a luminance blur image UY. Blur processing is performed intwo steps. In the first blur processing, a moving-average filter is usedas the filter for image processing (step S302). In the second blurprocessing, a Gaussian filter is used as the filter for imageprocessing. The brightness/saturation adjustment unit 413 produces theluminance blur image UY which represents the distribution of luminanceof the image by performing the two steps of blur processing (step S303).

Next, the brightness/saturation adjustment unit 413 determines anadjustment amount of a brightness level, which represents the degree ofadjustment of the brightness level (step S304). The adjustment amount ofthe brightness level is determined for each pixel by converting eachpixel value of the luminance blur image UY based on a lookup table LUTy.

The lookup table LUTy is a one-dimensional lookup table in whichcorrespondences between input values within the range of 0 through 1023and output values within the range of 0 through 1023 are stored. Forexample, a table as illustrated in FIG. 10 is used as the lookup tableLUTy. In the table illustrated in FIG. 10, if the input value exceeds apredetermined value, the output value becomes 0. In FIG. 10, thecorrespondences between the input values and the output values areillustrated by using the vertical axis and the horizontal axis. Thevertical axis represents the input values, and the horizontal axisrepresents the output values in FIG. 10.

The lookup table LUTy should be appropriately designed based on thepolicy for adjusting the brightness level. For example, the tableillustrated in FIG. 10 is designed based on a policy that only a darkportion of an image should be lightened without changing the brightnesslevel of a light portion of the image. However, there are various kindsof adjustment policies such as a policy that a dark portion is greatlylightened and a light portion is slightly lightened or a policy that thebrightness level of the light portion is slightly suppressed. The lookuptable LUTy is stored in the memory 43 illustrated in FIG. 2. The lookuptable LUTy is sent from the microcomputer 42 to thebrightness/saturation adjustment unit 413 through the process asdescribed above with reference to FIG. 4.

Next, an allocation of the adjustment amount of the brightness level toa portion contributing to brightness and an allocation of the adjustmentamount of the brightness level to a portion contributing to saturationare determined (step S305). The allocations of the adjustment amount ofthe brightness level are determined for each pixel which forms theimage. Specifically, rate 1 which is a portion contributing tobrightness and rate 2 which is a portion contributing to saturation aredetermined based on the following equations:Yp(x, y)=Y(x, y)+LUTy(UY(x, y))rate 1(x, y)=LUTy(UY(x, y))×LUTr(Yp)rate 2(x, y)=LUTy(UY(x, y))×(1−LUTr(Yp)),

where Yp is an estimated value of the luminance value of each pixel whenadjustment is performed based only on the luminance information obtainedfrom the luminance blur image UY.

The lookup table LUTr is, for example, a table illustrated in FIG. 11.In the table illustrated in FIG. 11, the output values are substantiallyconstant when the input values are less than or equal to a predeterminedvalue or when the input values are higher than or equal to apredetermined value. When the input values are in the remaining range,the output value increases as the input value increases. This table isdesigned based on a policy that the effect of a saturation adjustmentfunction should be particularly achieved in a dark region. The lookuptable LUTr should be appropriately designed based on the adjustmentpolicy in a similar manner to designing of the lookup table LUTy. Thelookup table LUTr is also stored in the memory 43. The lookup table LUTris sent from the microcomputer 42 to the brightness/saturationadjustment unit 413 through the process as described above withreference to FIG. 4.

As the above equations show, the rate 1 (x, y) and the rate 2 (x, y) aredetermined so that the total of the rate 1 and rate 2 is equal to theadjustment amount of the brightness level LUTy (UY (x, y)) which isdetermined in step S304. Further, the allocation to the rate 1 (x, y)and the allocation to the rate 2 (x, y) depend on the estimatedluminance value. Specifically, the adjustment amount of the brightnesslevel is determined by performing conversion based on the lookup tableLUTy. Then, the degree of adjustment of saturation is further determinedwithin the determined amount. Further, when the degree of adjustment ofsaturation is determined, an estimated value obtained by assuming thatthe saturation is not adjusted but only the brightness is adjusted isreferred to.

Next, the brightness/saturation adjustment unit 413 adds an adjustmentvalue of saturation and an adjustment value of brightness to the RGBvalue of each pixel (x, y) which forms an input signal according to thefollowing equations:R′(x, y)=R(x, y)+Y(x, y)×rate 1+R(x, y)×rate 2G′(x, y)=G(x, y)+Y(x, y)×rate 1+G(x, y)×rate 2B′(x, y)=B(x, y)+Y(x, y)×rate 1+B(x, y)×rate 2.

The adjustment value of saturation is obtained by weighting the RGBvalue based on the portion contributing to saturation. The adjustmentvalue of brightness is obtained by weighting the pixel value of theluminance image based on the portion contributing to brightness (stepS306).

Alternatively, the adjustment value of brightness may be obtained byweighting the pixel value of the luminance blur image based on theportion contributing to brightness. In other words, processing in stepS306 may be performed based on the following equations:R′(x, y)=R(x, y)+UY(x, y)×rate 1+R(x, y)×rate 2G′(x, y)=G(x, y)+UY(x, y)×rate 1+G(x, y)×rate 2B′(x, y)=B(x, y)+UY(x, y)×rate 1+B(x, y)×rate 2.

When the brightness level is adjusted using the above equations, thesaturation as well as the luminance is adjusted. Therefore, an imagewhich has natural colors, in other words, a natural image can beobtained. For example, when processing is performed using the lookuptables illustrated in FIGS. 10 and 11, adjustment of saturation iscarefully performed particularly on the dark region. Therefore, an imageis reproduced so that even fine-detail structures in the dark region areeasily recognized. Alternatively, the lookup table may also be designedso that the dark region is not changed because the dark region isunnecessary for diagnosis and only a region which is necessary fordiagnosis is processed so that fine-detail structures in the region areeasily recognized. As described above, the brightness level can beadjusted by using a method which is appropriate for the purpose of theimage, and the brightness level can be adjusted by an amount which isappropriate for the purpose.

Here, blur processing in steps S302 and S303 will be further described.

A method for producing a blur image of an image by replacing the valueof each pixel which forms the image with a value obtained by performingoperations using a filter for image processing is well known. In themethod for producing the blur image, as described above, a filter forimage processing, which has a size of approximately 3×3 pixels through15×15 pixels, is normally used to perform operations. However, thebrightness/saturation adjustment unit 413 performs an operation using afilter for image processing, which has a width of the one-fourth of thatof the image or wider. For example, if the width of the image is 1024pixels, a filter which has a size of 255×255 pixels or larger is used asthe filter for image processing.

FIGS. 12A and 12B are diagrams for explaining relationship between thesize of a filter for image processing and the result of processing. FIG.12A is a diagram illustrating an example of normal image processing.FIG. 12B is a diagram illustrating an example of image processingperformed by the brightness/saturation adjustment unit 413.

As illustrated in FIG. 12A, if a filter for image processing, which hasa size of 3×3 pixels is used, the value of each pixel depends on thevalues of nine pixels. Meanwhile, if a filter for image processing,which has a size of 255×255 pixels is used, the value of each pixeldepends on the values of 2552 pixels.

When the brightness level of an image in which a large difference inlightness/darkness is present is adjusted, it is not appropriate tosimply lighten a dark region. The difference in lightness/darknessshould be kept so that the image does not become an unnatural image.Specifically, the dark region should be lightened while the balance ofthe brightness level of the whole image is kept. Therefore, when thebrightness level of a pixel is determined, it is necessary that thebrightness level of the pixel is determined by referring to the valuesof pixels which are far from the pixel as well as the values of pixelsin the vicinity of the pixel.

For example, the value of each pixel of a luminance blur image producedusing a filter for image processing, which has a small size asillustrated in FIG. 12A, is determined independently of the values ofpixels which are apart from the pixel by 100 pixels or more. Therefore,there is a possibility that the relationship in lightness/darknessbetween the pixel and some of the pixels which are apart from the pixelby 100 pixels or more may be reversed.

In contrast, the value of each pixel of the luminance blur image whichis produced using a filter for image processing, which has a large sizeas illustrated in FIG. 12B, is determined by referring to the values ofpixels which are apart from the pixel by 100 pixels or more. Therefore,there is no possibility that the relationship in lightness/darknessbetween the pixel and some of the pixels which are apart from the pixelby 100 pixels or more is reversed. Hence, the balance oflightness/darkness in the whole image can be kept.

In the processing performed by the brightness/saturation adjustment unit413, the luminance blur image UY is used to calculate the estimatedluminance and to determine the portion contributing to brightness andthe portion contributing to saturation. The luminance blur image UY isan image in which the balance of lightness/darkness in the whole imageis faithfully reflected. Therefore, an image after adjustment is anatural image in which the balance of lightness/darkness is kept.

Here, if the size of the filter for image processing is large, theoperation amount is naturally large. However, since image processing ofthe electronic endoscope must be performed in real-time unlike imageprocessing of an X-ray apparatus, or the like, it is not desirable thatprocessing time becomes long.

Therefore, when the brightness/saturation adjustment unit 413 performsthe first blur processing in step S302, operations are performed byplacing the filter at every few pixels in both vertical and horizontaldirections. Accordingly, the operation amount is reduced. For example,if the operation is performed at every three pixels, the operationamount can be reduced to 1/9 of that of the operation performed on allof the pixels of the image. Accordingly, processing time can be reduced.

The brightness/saturation adjustment unit 413 may also perform thesecond blur processing at every few pixels in a similar manner to thatof the first blur processing. However, when an operation is performedusing a Gaussian filter, there is a possibility that an artifact iscreated if the processing is performed at every few pixels. Therefore,it is preferable that the operation in the first blur processing isperformed at every few pixels, and the operation in the second blurprocessing is performed on all of the pixels in the image.

2.4 Sharpness Adjustment Unit

The sharpness adjustment unit 414 performs image processing mainly toenhance the sharpness of the image. Since an image obtained by theendoscope does not include sharp edges, the sharpness adjustment unit414 performs processing mainly to enhance the structure of theobservation object, such as proj ections/depressions of the mucousmembrane and blood vessels.

For example, if some swelling is formed under the mucous membrane of thestomach, thin blood vessels form spirals, and thick blood vessels arecurved. Therefore, it is extremely important to observe the change inthe shape of the blood vessels to find a hidden lesion. However, thecolor of the inside of the stomach is substantially the same through theentire area of the stomach. Therefore, if a user tries to distinguishthe blood vessels based on the frequency components of the image, it isimpossible to distinguish the thick blood vessels from the shadow of aswelling.

Therefore, the sharpness adjustment unit 414 performs sharpnessadjustment processing while considering the color of the image.

FIG. 13 is a flow chart illustrating the outline of processing performedby the sharpness adjustment unit 414.

First, the sharpness adjustment unit 414 converts an input signal into aYCC signal, and produces a luminance image Y(x, y) including onlyluminance components (step S401).

Then, the sharpness adjustment unit 414 performs blur processing on theluminance image Y(x, y) using a filter for image processing, andproduces a luminance blur image U (Y (x, y)). The blur processing isperformed in two steps. In the first blur processing, a moving-averagefilter is used as the filter for image processing (step S402). If thefilter is too small, information about a relatively large structure suchas a projection/depression on the stomach wall is not included.Therefore, a filter which has a size of approximately 80×80 pixels isused. Further, in step S402, operations are performed at every fewpixels so as to reduce the operation amount in a manner similar to theprocessing performed by the brightness/saturation adjustment unit 413 instep S302.

In the second blur processing, a Gaussian filter is used as a filter forimage processing (step S403). As the Gaussian filter, three kinds offilters which have different standard deviations are used.

FIGS. 14A, 14B and 14C are diagrams illustrating three kinds of Gaussianfilters. In each of FIGS. 14A, 14B and 14C, the horizontal axisrepresents the position of each pixel when the position of the centralpixel of the filter for image processing is 0. The vertical axisrepresents the value of each pixel which forms the filter. FIG. 14A is adiagram illustrating a filter which has a largest standard deviationamong the three kinds of filters. The filter has a size of 79×79 pixels.If this filter is used, a relatively large structure such as theprojection/depression on the inner wall of an organ or an artery can beextracted. Further, FIG. 14B is a diagram illustrating a filter whichhas a standard deviation lower than that of the filter illustrated inFIG. 14A. The filter has a size of approximately 15×15 pixels. If thisfilter is used, a medium-sized structure such as blood vessels whichhave regular thicknesses can be extracted. FIG. 14C is a diagramillustrating a filter which has a standard deviation lower than that ofthe filter illustrated in FIG. 14B. The filter in FIG. 14C has a size ofapproximately 3×3 pixels. If this filter is used, a thin structure suchas capillary vessels can be extracted.

In step S403, if a Gaussian filter in which a standard deviation is setbased on the size of a structure which should be enhanced is used, aluminance blur image UY can be produced so that sufficient imageinformation for distinguishing the structure which should be enhancedremains in the luminance blur image UY.

In the second blur processing, operations may be performed in threesteps by using three kinds of Gaussian filters. However, the operationshould be performed by using a filter for image processing, which hasthe functions of all of the three Gaussian filters, so as to reduceprocessing time.

After the sharpness adjustment unit 414 produces the luminance blurimage UY, the sharpness adjustment unit 414 calculates a differencebetween the value of the luminance image Y and the value of theluminance blur image UY for each pixel based on the following equation:C(x, y)=|Y(x, y)−UY(x, y)|×LUTy(UY(x, y)).

Then, the sharpness adjustment unit 414 determines a sharpnessenhancement amount C (x, y) based on the difference value (step S404)The lookup table LUTy may be the same as the lookup table LUTy which isused by the brightness/saturation adjustment unit 413. Alternatively,the lookup table LUTy may be designed based on another adjustmentpolicy.

In general sharpness enhancement processing, the sharpness is enhancedby simply adding the sharpness enhancement amount C(x, Y) as describedabove to each pixel value of the input image. However, in the processingperformed by the sharpness adjustment unit 414, enhancement amount Cr(x,y), Cg(x, y) or Cb(x, y) for each color, which depends on colors, areobtained (step S405). The sharpness is enhanced by adding theenhancement amount for each color to each pixel value of the inputimage.

The enhancement amount for each color is calculated as follows. First,rate 3 (portion contributing to brightness), which represents a portioncontributing to adjustment of brightness in sharpness enhancement, andrate 4 (portion contributing to saturation), which represents a portioncontributing to adjustment of saturation in sharpness enhancement, aredetermined based on the following equations:rate 3=LUTc(Y(x, y))×(x, y)rate 4={1−LUTc(Y(x, y))}×(x, y).

As the above equations show, the portion contributing to brightness andthe portion contributing to saturation are determined so that the sum ofthe portion contributing to brightness and the portion contributing tosaturation is equal to the sharpness enhancement amount obtained in stepS404. LUTc is a table for determining an allocation to the portioncontributing to brightness and an allocation to the portion contributingto saturation. The table LUTc may be defined based on the targeted imagequality as appropriate.

Next, the enhancement amount for each color is determined based on thefollowing equations:Cr(x, y)=Y(x, y)×rate 3+R(x, y)×rate 4Cg(x, y)=Y(x, y)×rate 3+G(x, y)×rate 4Cb(x, y)=Y(x, y)×rate 3+B(x, y)×rate 4.

Alternatively, the enhancement amount for each color may be determinedbased on the following equations:Cr(x, y)=C(x, y)×R(x, y)/Y(x, y)Cg(x, y)=C(x, y)×G(x, y)/Y(x, y)Cb(x, y)=C(x, y)×B(x, y)/Y(x, y).

Next, the enhancement amount for each color which was obtained by usingone of the sets of equations as described above is added to the inputsignal, and the sharpness is enhanced as described in the followingequations (step S406):R′(x, y)=R(x, y)+Cr(x, Y)G′(x, y)=G(x, y)+Cg(x, Y)B′(x, y)=B(x, y)+Cb(x, Y).

If the sharpness is enhanced by adding the enhancement amount for eachcolor, the sharpness can be enhanced according to the color of theimage. In this case, since the color component which is enhanced isdifferent between the thick blood vessels and the shadow of a swelling,the shadow of the swelling is not recognized as a blood vessel bymistake.

As described above, both of the brightness/saturation adjustment unit413 and the sharpness adjustment unit 414 produce luminance blur images,and use the produced luminance blur images for processing. Therefore, aprocessing unit for producing a luminance blur image may be providedbefore the selector 417 a illustrated in FIG. 2, and the luminance blurimage produced by the processing unit may be input to thebrightness/saturation adjustment unit 413 and the sharpness adjustmentunit 414. In this case, a filter for image processing, which is used toproduce the luminance blur image, is a filter which has two kinds offunctions.

The lookup table and the filter for image processing which are used bythe sharpness adjustment unit 414 are stored in the memory 43illustrated in FIG. 2. The lookup table and the filter for imageprocessing are sent from the microcomputer 42 to the sharpnessadjustment unit through the process as described above with reference toFIG. 4.

2.5 Hue Adjustment Unit

The hue adjustment unit 415 performs image processing so as to expand ahue which is necessary for diagnosis and to reduce a hue which is notnecessary for diagnosis.

In examinations using an endoscope, test agent including dye isdistributed to examine the human body in some cases. For example, ifdark-blue test agent called Indigo Carmine is distributed on the innerwall of the stomach, the test agent remains in the fold of the mucousmembrane. Therefore, the projections/depressions on the stomach wall canbe observed as a contrast of red and blue. Further, when dark-blue testagent called Methylene Blue is distributed, only the normal mucousmembrane is dyed in blue. However, tumors are not dyed in blue.Therefore, it is possible to recognize whether a tumor is present andthe position of the tumor, if the tumor is present.

When the examination as described above is performed, information suchas that the tone of the mucous membrane is slightly different in eachregion is not necessary for diagnosis.

FIG. 15 is a flow chart illustrating the outline of processing performedby the hue adjustment unit 415. First, the hue adjustment unit 415converts an RGB signal into an HSV (Hue, Saturation and Value) signal,and extracts only a hue component. Accordingly, the hue adjustment unit415 produces a hue image which shows the distribution of hues (stepS501). Then, the hue adjustment unit 415 converts the value H(x, y) ofeach pixel which forms the hue image by using a lookup table LUTh (stepS502).

The lookup table LUTh is a table which is designed so that the hue isexpanded in a range of colors which are necessary for diagnosis, and sothat the hue is narrowed in a range of colors which are unnecessary fordiagnosis.

For example, if the lookup table LUTh illustrated in FIG. 16 is used,blue-purple is replaced with a color which is closer to blue. If imageprocessing is performed using the lookup table LUTh, when photograph istaken after a blue-purple test agent is distributed, it is possible toincrease the contrast in color between the portion of the mucousmembrane, onto which the test agent is attached, and the portion of themucous membrane, onto which the test agent is not attached. Further, ifthe lookup table LUTh illustrated in FIG. 16 is used, all of the colorsfrom red through pink are replaced with pink. Therefore, if imageprocessing is performed by using the lookup table LUTh, a slightdifference in reddish colors of the mucous membrane does not appear inthe image.

Further, the lookup table LUTh illustrated in FIG. 17 is a table whichreplaces only the color of the pigment of hemoglobin with green andwhich does not replace other colors. This table is designed to producean image which is appropriate for examination of the blood flow byincreasing a difference between the color of the blood and that of themucous membrane.

All of the colors included in an image obtained by an endoscope arereddish colors. None of the colors of a photography object is blue orgreen except that of the test agent. Therefore, even if the color of theblood is replaced with green, there is no possibility that the blood isnot distinguished from another green object. Hence, in endoscopic imageprocessing, it is possible to perform processing so as to extremelyexpand the hue, as illustrated in FIG. 17.

After the hue adjustment unit 415 expands or reduces the hue byreplacing colors by using the lookup table LUTh in step S502, the hueadjustment unit 415 converts an HSV signal into an RGB signal (stepS503). The HSV signal is a signal including hue data H′(x, y), which isobtained by performing conversion using the lookup table LUTh, as a huecomponent.

It is preferable that a plurality of lookup tables is prepared as thelookup table LUTh. The plurality of lookup tables should be designedbased on the idea of a radiologist who is the user of the endoscope, thedesign policy of the manufacturer of the endoscope, the type of testagent for examination, the region which is examined, the purpose ofexamination, or the like. The lookup table LUTh may be provided by themanufacturer which supplies the electronic endoscope system 1.Alternatively, the lookup table LUTh may be created by the user of theelectronic endoscope system 1. The lookup table LUTh is stored in thememory 43 illustrated in FIG. 2. The lookup table LUTh is sent from themicrocomputer 42 to the hue adjustment unit 415 through the process asdescribed above with reference to FIG. 4.

In the above example, the hue is adjusted in HSV space. However, the RGBsignal may be converted into a Lab signal, and the Lab signal may beconverted into an RGB signal again after the a-component and b-componentof the Lab signal are converted by using a lookup table.

Alternatively, it is also possible that an RGB signal is not convertedinto a signal in other color space. In that case, a three-dimensionalLUT may be prepared in a similar manner to the processing performed bythe standard image production unit 411 or the color replacement unit412. Then, the input RGB signal may be directly replaced with an RGBsignal which is produced by performing hue adjustment.

In the above description, the processor 3 corresponds to the electronicendoscope apparatus according to the present invention. Processingperformed by the sharpness adjustment unit 414 of the image processingcircuit 41 of the processor 3 corresponds to the method according to thepresent invention. Further, as described above, the image processingcircuit 41 may be a circuit on which a CPU specialized in imageprocessing and a memory in which six kinds of image processing programare stored are arranged. Further, a program for sharpness adjustmentprocessing in the embodiment as described above corresponds to theprogram of the present invention.

An embodiment of the present invention has been described in detail.However, the scope of the present invention should not be limited to theabove embodiment, but it should be defined by the claims of the presentapplication.

1. A sharpness adjustment method for adjusting the sharpness of an imageobtained by an endoscope, the method comprising the steps of:determining a sharpness enhancement amount for each pixel of the imagebased on the value of each pixel which forms a luminance distributionimage representing the distribution of luminance of the image;determining a portion contributing to brightness, which represents aportion of the sharpness enhancement amount, which contributes toadjustment of brightness, and a portion contributing to saturation,which represents a portion of the sharpness enhancement amount, whichcontributes to adjustment of saturation, for each pixel of the image sothat the sum of the portion contributing to brightness and the portioncontributing to saturation is equal to the sharpness enhancement amount;and adding an adjustment value of saturation, which is obtained byweighting the value of each pixel of the image based on the portioncontributing to saturation, and an adjustment value of brightness, whichis obtained by weighting the value of each pixel of the luminancedistribution image, which corresponds to each pixel of the image, basedon the portion contributing to brightness, to the value of each pixelwhich forms the image.
 2. A sharpness adjustment method for adjustingthe sharpness of an image obtained by an endoscope, the methodcomprising the steps of: determining a sharpness enhancement amount foreach pixel of the image based on the value of each pixel which forms aluminance distribution image representing the distribution of luminanceof the image; and adding a value which is obtained by multiplying thesharpness enhancement amount by a ratio between the value of each pixelof the image and the value of each pixel of the luminance distributionimage, which corresponds to each pixel of the image, to the value ofeach pixel which forms the image.
 3. A computer readable recordingmedium having stored therein a program that causes a computer to executea method for adjusting the sharpness of an image obtained by anendoscope, the program comprising the procedures for: determining asharpness enhancement amount for each pixel of the image based on thevalue of each pixel which forms a luminance distribution imagerepresenting the distribution of luminance of the image; determining aportion contributing to brightness, which represents a portion of thesharpness enhancement amount, which contributes to adjustment ofbrightness, and a portion contributing to saturation, which represents aportion of the sharpness enhancement amount, which contributes toadjustment of saturation, for each pixel of the image so that the sum ofthe portion contributing to brightness and the portion contributing tosaturation is equal to the sharpness enhancement amount; and adding anadjustment value of saturation, which is obtained by weighting the valueof each pixel of the image based on the portion contributing tosaturation, and an adjustment value of brightness, which is obtained byweighting the value of each pixel of the luminance distribution image,which corresponds to each pixel of the image, based on the portioncontributing to brightness, to the value of each pixel which forms theimage.
 4. A computer readable recording medium having stored therein aprogram that causes a computer to execute a method for adjusting thesharpness of an image obtained by an endoscope, the program comprisingthe procedures for: determining a sharpness enhancement amount for eachpixel of the image based on the value of each pixel which forms aluminance distribution image representing the distribution of luminanceof the image; and adding a value which is obtained by multiplying thesharpness enhancement amount by a ratio between the value of each pixelof the image and the value of each pixel of the luminance distributionimage, which corresponds to each pixel of the image, to the value ofeach pixel which forms the image.
 5. An electronic endoscope apparatuscomprising: a luminance distribution image production means forproducing a luminance distribution image representing the distributionof luminance of an image obtained by an endoscope; and a sharpnessadjustment means for adjusting the sharpness of the image by using theluminance distribution image produced by the luminance distributionimage production means, wherein the sharpness adjustment means performsprocessing for determining a sharpness enhancement amount for each pixelof the image based on the value of each pixel which forms the luminancedistribution image representing the distribution of luminance of theimage, processing for determining a portion contributing to brightness,which represents a portion of the sharpness enhancement amount, whichcontributes to adjustment of brightness, and a portion contributing tosaturation, which represents a portion of the sharpness enhancementamount, which contributes to adjustment of saturation, for each pixel ofthe image so that the sum of the portion contributing to brightness andthe portion contributing to saturation is equal to the sharpnessenhancement amount, and processing for adding an adjustment value ofsaturation, which is obtained by weighting the value of each pixel ofthe image based on the portion contributing to saturation, and anadjustment value of brightness, which is obtained by weighting the valueof each pixel of the luminance distribution image, which corresponds toeach pixel of the image, based on the portion contributing tobrightness, to the value of each pixel which forms the image.
 6. Anelectronic endoscope apparatus comprising: a luminance distributionimage production means for producing a luminance distribution imagewhich represents the distribution of luminance of an image obtained byan endoscope; and a sharpness adjustment means for adjusting thesharpness of the image by using the luminance distribution imageproduced by the luminance distribution image production means, whereinthe sharpness adjustment means performs processing for determining asharpness enhancement amount for each pixel of the image based on thevalue of each pixel which forms the luminance distribution imagerepresenting the distribution of luminance of the image and processingfor adding a value obtained by multiplying the sharpness enhancementamount by a ratio between the value of each pixel of the image and thevalue of each pixel of the luminance distribution image, whichcorresponds to each pixel of the image, to the value of each pixel whichforms the image.